import request from '@/utils/request'

//显示所有分类数据
export const CategoryListService = ()=>{
    return request.get('/category/allCategory');
}

//添加分类
export const addCategoryService = (CategoryData)=>{
    return request.post('/category',CategoryData);
}

//编辑分类
export const updateCategoryService = (CategoryData)=>{
    return request.put('/category',CategoryData);
}

//删除分类
export const deleteCategoryService = (id)=>{
    return request.delete('/category?id='+id);
}